Main module implementation